package com.example.demo.dao;

import com.example.demo.entity.UserInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * @ClassName:UserRespository
 * @Description:
 * @Author:Deamer
 * @Date:2020/3/30 16:15
 **/
public interface UserInfoRespository extends JpaRepository<UserInfo, Integer> {
    @Query(value = "select username from user_info where username=:username", nativeQuery = true)
    String getUsername(String username);
}
